package com.atguigu.security.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

/**
 * @program: springboot-05-security
 * @description:
 * @author: qiaoli
 * @create: 2020-04-28 10:04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Role implements GrantedAuthority {
    @TableId(type = IdType.AUTO)
   private int rid;
   private String rname;
   private String rdesc;

   @JsonIgnore
   @Override
    public String getAuthority() {
        return rname;
    }
}
